<div class="layui-card js-view-addArticle">
    <div class="layui-card-header">
        <a class="cl-38f" target="page" href="{:U('Article/nodes')}">文章栏目</a> / {$row?'编辑':'添加'}栏目
    </div>
    <div class="layui-card-body">
        <form class="layui-form" method="post" action="{:U('Article/addNode')}?id={$row.id??''}" >
            <div class="layui-tab">
                <ul class="layui-tab-title">
                    <li class="layui-this">基本信息</li>
                    <li>SEO设置</li>
                    <li>栏目内容</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show pt10 w700">
                        <div class="layui-form-item">
                            <label class="layui-form-label">栏目名称</label>
                            <div class="layui-input-block">
                                <input type="text" name="name" value="{$row.name??''}" lay-verify="required" placeholder="请输入栏目名称" autocomplete="off" class="layui-input" maxlength="50" autofocus/>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">英文别名</label>
                            <div class="layui-input-block">
                                <input type="text" name="en_title" value="{$row.en_title??''}" placeholder="请输入英文别名" autocomplete="off" class="layui-input" maxlength="200"/>
                            </div>
                        </div>
                        {if isset($pid)&&$pid&&$ptitle }
                        <div class="layui-form-item">
                            <label class="layui-form-label">上级栏目</label>
                            <div class="layui-input-block"><input value="{$ptitle}" class="layui-input" disabled style="border: none;"/>
                                <input type="hidden" name="parent_id" value="{$pid}"/>
                            </div>
                        </div>
                        {/if}
                        <div class="layui-form-item">
                            <label class="layui-form-label">文章模型</label>
                            <div class="layui-input-block">
                                <select name="channel_id">
                                    <option value="0">默认</option>
                                    {foreach $channelList as $item}
                                    <option value="{$item.id}" {if $row&&$item.id==$row.channel_id }selected{/if}>{$item.title}</option>
                                    {/foreach}
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">栏目图片</label>
                            <div class="layui-input-block">
                                {imgspace name="img" value="$row.img??''" title="栏目图片" /}
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">栏目模板</label>
                            <div class="layui-input-block">
                                <select name="tmpl_path">
                                    {foreach $templist as $key=>$item}
                                    <option value="{$key}" {if $row&&$key==$row['tmpl_path'] }selected{/if}>{$item}</option>
                                    {/foreach}
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">文章模板</label>
                            <div class="layui-input-block">
                                <select name="tmpl_view">
                                    {foreach $templist_view as $key=>$item}
                                    <option value="{$key}" {if $row&&$key==$row['tmpl_view'] }selected{/if}>{$item}</option>
                                    {/foreach}
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">是否发布</label>
                            <div class="layui-input-block">
                                <input type="radio" name="ifpub" value="true" title="是" {if !isset($row['ifpub'])||$row['ifpub']!='false' }checked{/if}/>
                                <input type="radio" name="ifpub" value="false" title="否" {if isset($row['ifpub'])&&$row['ifpub']=='false' }checked{/if}/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab-item w700 pt10">
                        <div class="layui-form-item">
                            <label class="layui-form-label">SEO标题</label>
                            <div class="layui-input-block">
                                <input type="text" name="seo_title" value="{$row.seo_title??''}" autocomplete="off" class="layui-input" placeholder="SEO标题" maxlength="100"/>
                                <p class="cl-888 mt5 f12"> 默认为文章栏目名称 </p>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">SEO关键词</label>
                            <div class="layui-input-block">
                                <input type="text" name="seo_keywords" value="{$row.seo_keywords??''}" autocomplete="off" class="layui-input" placeholder="SEO关键词" maxlength="100"/>
                                <p class="cl-888 mt5 f12"> 默认为文章栏目名称 </p>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">SEO描述</label>
                            <div class="layui-input-block">
                                <textarea name="seo_description" class="layui-textarea" placeholder="SEO描述">{$row.seo_description??''}</textarea>
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab-item">
                        <div style="width: 780px;">
                            栏目内容
                            <div class="mt10">
                                {editor name="content" type="ueditor" } {$row.content??''} {/editor}
                            </div>
                            <div class="mt10">手机端内容<span class="ml10 f12 cl-999">（选填）手机端模板内容，不设置默认和上面一样</span></div>
                            <div class="mt10">
                                {editor name="wap_content" type="ueditor"} {$row.wap_content??''} {/editor}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="mt30 pl100 pb30">
                <button class="layui-btn layui-btn-normal" lay-submit>确认提交</button>
            </div>
        </form>
    </div>
</div>





